package com.bup.gn.model;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "lyrics")
@Access(AccessType.FIELD)
public class Lyric extends BaseEntity {
    public static final int WAITING = 1;
    public static final int REVIEWED = 2;
    public static final int PUBLISHED = 3;
    public static final int HOLD = 4;

    @Column(name = "status")
    private int status;

    @ManyToOne
    @JoinColumn(name = "lesson_id")
    private Article article;

    @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "lyric_id", referencedColumnName = "id")
    private List<Line> lines;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Article getArticle() {
        return article;
    }

    public void setArticle(Article article) {
        this.article = article;
    }

    public List<Line> getLines() {
        return lines;
    }

    public void setLines(List<Line> lines) {
        this.lines = lines;
    }
}
